home *** CD-ROM | disk | FTP | other *** search
/ 220 Jogos / 220 jogos.iso / classicos / resta11 / STexture.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-12-02  |  1.2 KB  |  57 lines

  1. // STexture.h: Schnittstelle fⁿr die Klasse STexture.
  2. //
  3. // Copyright by AndrΘ Stein
  4. // E-Mail: andre_stein@gmx.de, andre_stein@web.de
  5. // http://www.steinsoft.net
  6. //////////////////////////////////////////////////////////////////////
  7.  
  8. #ifndef S_TEXTURE_H
  9. #define S_TEXTURE_H
  10.  
  11. #if _MSC_VER > 1000
  12. #pragma once
  13. #endif 
  14.  
  15. #include <windows.h>
  16.  
  17. #include <gl\gl.h>
  18. #include <gl\glu.h>
  19.  
  20.  
  21. class STexture  
  22. {
  23. public:
  24.     void destroy();
  25.     
  26.     /////////////
  27.     // Konstruktoren
  28.     ///////////////
  29.     STexture();
  30.     STexture(const char* filename,int minFilter = GL_LINEAR,
  31.         int magFilter = GL_LINEAR, bool clampToEdge = false);
  32.  
  33.  
  34.     virtual ~STexture();
  35.     
  36.     /////////////////
  37.     // Funktionen
  38.     ////////////////
  39.  
  40.     virtual bool createMipmap(const char* filename,int minFilter = GL_LINEAR_MIPMAP_NEAREST,
  41.         int magFilter = GL_LINEAR, bool clampToEdge = false);
  42.     virtual bool createTexture(const char* filename, int minFilter = GL_LINEAR,
  43.         int magFilter = GL_LINEAR, bool clampToEdge = false);
  44.     
  45.     void select();
  46.     GLuint getGLTexture();
  47.     
  48.  
  49. private:
  50.     HBITMAP hBitmap;
  51.     bool loadBitmap(const char* filename,BITMAP& bitmap);
  52. protected:
  53.     GLuint texture;
  54. };
  55.  
  56. #endif 
  57.